package everyday;

import org.junit.jupiter.api.Test;

import java.util.Arrays;
import java.util.stream.Stream;

/**
 * @Author: Siantar
 * @Date: 2023-07-04-12:08
 * @Description: 1.0
 */
public class T2679 {
    public int matrixSum(int[][] nums) {
        int sum = 0;
        for (int[] num : nums) Arrays.sort(num);
        for (int i = 0; i < nums[0].length; i++) {
            int max = 0;
            for (int j = 0; j < nums.length; j++) {
                max = Math.max(max, nums[j][i]);
            }
            sum += max;
        }
        return sum;
    }

    @Test
    public void test() {
        matrixSum(new int[][]{{1, 2}});
    }
}
